package com.gxkj.qiao.services.impl;

import com.gxkj.qiao.daos.MovieDaoImpl;
import com.gxkj.qiao.entitys.Movie;
import com.gxkj.qiao.services.MovieService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MovieServiceImpl implements MovieService {

    Logger LOG = LoggerFactory.getLogger(MovieServiceImpl.class);

    @Autowired
    private MovieDaoImpl movieDao;


    public void doAddMovie(Movie entity) {
        movieDao.insert(entity);
    }


    public Movie getMovieByDirectAndTile(String movieDirect, String movieTitle) {
        Movie dbMovie =   movieDao.getMovieByDirectAndTile(movieDirect,movieTitle);
        return dbMovie;
    }
}
